/**
 * @(#)Text1.java
 *
 *
 * @author Duyun Chen
 * @version 1.00 2008/10/15
 */

import Pursuit_Client.PursuitPlayer;
import java.util.Scanner;

public class testchaser implements PursuitPlayer {
	
	//svn test comment, delete me
	Scanner in = new Scanner(System.in);
	private double meX, meY, meTheta, meU, meV, meW, himX, himY, himTheta, himU, himV, himW;
	
    public testchaser() {
    }
    
    public void update(double mex, double mey, double metheta, double meu, double mev, double mew,
    					double himx, double himy, double himtheta, double himu, double himv, double himw) {
    	meX = mex;
    	meY = mey;
    	meTheta = metheta;
    	meU = meu;
    	meV = mev;
    	meW = mew;
    	himX = himx;
    	himY = himy;
    	himTheta = himtheta;
    	himU = himu;
    	himV = himv;
    	himW = himw;
    }
    
    public double getAcceleration() {
    	//System.out.println("Enter a shit");
    	return in.nextDouble()+1;
    }
    
    public double getAngularAcceleration() {
    	return (Math.abs(meW) > 1)? 0.9999999999:-meW;
    }
    
    public String getRole() {
    	return "chaser";
    }
    
    private double random(double low, double high) {
    	return (high-low+1)*Math.random() + low;
    }
    
    private double getDistance(double x1, double y1, double x2, double y2) {
    	double dx = x1 - x2, dy = y1 - y2;
    	return Math.sqrt(dx*dx + dy*dy);
    }
}